# Carbon Jiao <http://archlive-pkg.googlecode.com>

pkgname=archlive-installer
pkgver=17
pkgrel=2
pkgdesc="Archlive项目之一，安装archlive系统到硬盘或者根据清单快速安装Arch GNU/Linux"
url="http://archlive.googlecode.com"
depends=('pacman' 'mkinitcpio' 'xdialog' 'e2fsprogs' 'sed' 'coreutils' 'archlinux-installer")
makedepends=("mercurial")
optdepends=('gparted')
source=()
arch=(i686 x86_64)
license=('GPL')

_hgroot="http://archlive.googlecode.com/hg"
_hgrepo="archlive-installer"

build() {
	cd $srcdir
	if [ -d ${_hgrepo} ]; then
		cd ${_hgrepo}
		hg pull -u
	else
		hg clone ${_hgroot}/${_hgrepo}
		cd ${_hgrepo}
	fi
	cd $pkgname
	install -D -m755 $pkgname $pkgdir/opt/$pkgname/bin/$pkgname
	install -D -m755 $pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
	install -D -m777 archlive.svg $pkgdir/usr/share/pixmaps/archlive.svg
}
